#include "CString.h"

int main()
{
    PTCHAR lpTch;
    //PCHAR lpCh;
    //PWCHAR lpWch;


    CString str;
    CString str1 = L"HelloWOrld";
    CString str2 = L"123";
    CString str9 = L"123";

    if (str2 <= str9)
    {
        str = L"abc" + str2;
    }

    CString strT;
    strT = L"HelloWOrld";
    strT += "123";
    strT.Trim(L"ld");
    strT.Trim(L'H');
    strT.Trim();
    strT.TrimLeft(L"Hi");
    strT.TrimLeft(L'H');
    strT.TrimRight(L"ld");
    strT.TrimRight(L'd');
    strT.ReverseFind(L'l');
    strT.Replace(L'l', L'2');
    strT.Replace(L"llo", L"123");
    strT.Remove(L'l');
    strT.Mid(5, 2, str);
    strT.Insert(0, L'1');
    strT.Insert(5, L"123333333333333333");
    strT.FindOneOf(L"lW");
    strT.Find(L"W");
    strT.Find(L'W');
    strT.Right(5, str);
    strT.Left(5, str);
    strT.MakeLower();
    strT.MakeUpper();
    strT.MakeReverse();
    strT.Delete(0, 99);
    strT = L"HelloWOrld";
    strT.Delete(9, 1);
    strT.CompareNoCase(L"HelLo");
    strT += L"WOrld";
    strT += L'A';
    strT[2];
    strT.Append(L"WOrld");
    lpTch = strT.GetBuffer();
    strT.ReleaseBuffer(lpTch);


    CStringA str3;
    CStringA str4 = "HelloWOrld";
    CStringA str5 = "123";

    if (str5 != str4)
    {
        str3 = str4 + "123" + str5;
        str3 = "abc" + str4;
    }

    CStringA strA = L"";
    strA.Format("%s", "Hello");
    strA.AppendFormat("%s%d", "WOrld", 123);
    strA.MakeLower();
    strA.MakeUpper();
    strA.MakeReverse();
    strA = "Hello";
    strA.Append("Wold");
    strA += L"123";
    strA.TrimLeft('h');
    strA.TrimRight("ld");
    strA.TrimRight(' ');
    strA.TrimRight();
    strA.ReverseFind('l');
    strA.Replace('l', '2');
    strA.Replace("llo", "123");
    strA.Remove('l');
    strA.Insert(10, '1');
    strA.Insert(5, "123333333333333333");
    strA.Insert(5, "123");
    strA.FindOneOf("xW");
    strA.Find("W");
    strA.Find('W');
    strA.Delete(4, 2);

    CStringW strW = "";

    return 0;
}